package com.softserveinc.interactive_board.commons;

import java.util.ArrayList;
import java.util.List;

import com.softserveinc.interactive_board.domain.Presentation;

public class CheckedPresentationsList {
	
	List<CheckedPresentationContainer> list = new ArrayList<CheckedPresentationContainer>();
	
	public List<Presentation> getCheckedPresentations() {
		List<Presentation> buff = new ArrayList<Presentation>();
		for (CheckedPresentationContainer i : this.list)
			if (i.isChecked())
				buff.add(i.getPresentation());
		return buff;
	}
	
	public CheckedPresentationsList(List<Presentation> list) {
		for (Presentation u : list)
			this.list.add(new CheckedPresentationContainer(u, false));
	}
	
	public CheckedPresentationsList() {
		this.list = new ArrayList<CheckedPresentationContainer>();
	}

	public List<CheckedPresentationContainer> getList() {
		return list;
	}

	public void setList(List<CheckedPresentationContainer> list) {
		this.list = list;
	}

}
